package com.ruoyi.technician.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.technician.mapper.TechnicianSosMapper;
import com.ruoyi.technician.domain.TechnicianSos;
import com.ruoyi.technician.service.ITechnicianSosService;

/**
 * 技师求救Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-19
 */
@Service
public class TechnicianSosServiceImpl implements ITechnicianSosService 
{
    @Autowired
    private TechnicianSosMapper technicianSosMapper;

    /**
     * 查询技师求救
     * 
     * @param id 技师求救主键
     * @return 技师求救
     */
    @Override
    public TechnicianSos selectTechnicianSosById(Long id)
    {
        return technicianSosMapper.selectTechnicianSosById(id);
    }

    /**
     * 查询技师求救列表
     * 
     * @param technicianSos 技师求救
     * @return 技师求救
     */
    @Override
    public List<TechnicianSos> selectTechnicianSosList(TechnicianSos technicianSos)
    {
        return technicianSosMapper.selectTechnicianSosList(technicianSos);
    }

    /**
     * 新增技师求救
     * 
     * @param technicianSos 技师求救
     * @return 结果
     */
    @Override
    public int insertTechnicianSos(TechnicianSos technicianSos)
    {
        technicianSos.setCreateTime(DateUtils.getNowDate());
        return technicianSosMapper.insertTechnicianSos(technicianSos);
    }

    /**
     * 修改技师求救
     * 
     * @param technicianSos 技师求救
     * @return 结果
     */
    @Override
    public int updateTechnicianSos(TechnicianSos technicianSos)
    {
        technicianSos.setUpdateTime(DateUtils.getNowDate());
        return technicianSosMapper.updateTechnicianSos(technicianSos);
    }

    /**
     * 批量删除技师求救
     * 
     * @param ids 需要删除的技师求救主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianSosByIds(Long[] ids)
    {
        return technicianSosMapper.deleteTechnicianSosByIds(ids);
    }

    /**
     * 删除技师求救信息
     * 
     * @param id 技师求救主键
     * @return 结果
     */
    @Override
    public int deleteTechnicianSosById(Long id)
    {
        return technicianSosMapper.deleteTechnicianSosById(id);
    }
}
